package com.adaxi.adc.business.manager.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

/**
 * 车辆行程表
 * @TableName adc-vehicle-trip
 */
@TableName(value ="adc_vehicle_trip")
@Data
public class VehicleTrip implements Serializable {
    /**
     * 车辆的ID
     */
    @TableId(value = "vehicle_id", type = IdType.AUTO)
    private Long vehicleId;
    /**
     * 司机真实姓名
     */
    @TableField(value = "name")
    private String name;

    /**
     * 司机用户名字
     */
    @TableField(value = "username")
    private String username;

    /**
     * 司机手机号码
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 车牌号
     */
    @TableField(value = "vehicle_license")
    private String vehicleLicense;

    /**
     * 发车时间
     */
    @TableField(value = "start_time")
    private Date startTime;
    public String getFormattedDateTime() {
        SimpleDateFormat sdf = new SimpleDateFormat(" HH:mm:ss");
        return sdf.format(new Date(startTime.getTime()));
    }

    /**
     * 发车日期
     */
    @TableField(value = "start_date")
    private Date startDate;
    public String getFormattedDate() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        return sdf.format(new Date(startDate.getTime()));
    }

    /**
     * 已有乘坐人数
     */
    @TableField(value = "num_passengers")
    private Integer numPassengers;

    /**
     * 最大载客量
     */
    @TableField(value = "max_seat_capacity")
    private Integer maxSeatCapacity;

    /**
     * 行程状态
     */
    @TableField(value = "status")
    private Object status;

    /**
     * 车辆的行程路线ID
     */
    @TableField(value = "vehicle_route_id")
    private Long vehicleRouteId;

    /**
     * 起始地点名称
     */
    @TableField(value = "start_location_name")
    private String startLocationName;

    /**
     * 起始地点经度
     */
    @TableField(value = "start_location_longitude")
    private BigDecimal startLocationLongitude;

    /**
     * 起始地点纬度
     */
    @TableField(value = "start_location_latitude")
    private BigDecimal startLocationLatitude;

    /**
     * 逻辑删除状态字段: 0 表示未删除, 1 表示已删除
     */
    @TableField(value = "is_deleted")
    private Integer isDeleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
//    @JsonInclude(JsonInclude.Include.NON_NULL)
//    @TableField(exist = false)
//    private RoutePrice  routePrice;
}